﻿using System;
using System.Linq;
using System.Text;
using DevExpress.Xpo;
using DevExpress.ExpressApp;
using System.ComponentModel;
using DevExpress.ExpressApp.DC;
using DevExpress.Data.Filtering;
using DevExpress.Persistent.Base;
using System.Collections.Generic;
using DevExpress.ExpressApp.Model;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Persistent.Validation;
using DevExpress.ExpressApp.Security.Strategy;

namespace aztall.Module.BusinessObjects
{
	[DefaultClassOptions]
	public class User : SecuritySystemUser
	{
		protected string _email;
		public User(Session session)
				: base(session)
		{
		}
		public override void AfterConstruction()
		{
			base.AfterConstruction();
		}
		public string email
		{
			get { return _email; }
			set { SetPropertyValue(nameof(email), ref _email, value); }
		}

		[Association("Domain_User", UseAssociationNameAsIntermediateTableName = true), DevExpress.Xpo.DisplayName("Domains")]
		[Delayed]
		public XPCollection<Domain> Domains
		{
			get { return GetCollection<Domain>(nameof(Domains)); }
		}
	}
}
